package com.ruoyi.eduadmin.api.factory;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.eduadmin.api.EduadminService;
import com.ruoyi.eduadmin.api.domain.TTeachTrace;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class EduadminServiceFallbackFactory implements FallbackFactory<EduadminService> {
    @Override
    public EduadminService create(Throwable cause) {
        return new EduadminService() {
            @Override
            public AjaxResult add(TTeachTrace tTeachTrace) {
                return AjaxResult.error(-1, "网络延迟，请稍后再试");
            }
        };
    }
}
